package idv.arthur.svn;

import java.io.IOException;

import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
import org.tmatesoft.svn.core.wc.SVNWCUtil;

public class DBug {

	public static void main(String[] args) throws SVNException, IOException {
		SVNRepository repo = null;
		
		final String svnURL = "http://10.144.136.56/svndps_test/dpssvn01";
		final String usrId = "dpssvn01";
		final String usrPwd = "abcd1234";
		
		try {
			repo = SVNRepositoryFactory.create( SVNURL.parseURIEncoded( svnURL ) );
			repo.setAuthenticationManager( SVNWCUtil.createDefaultAuthenticationManager(usrId,usrPwd ) );
			System.out.println("目前Repo的版次："+repo.getLatestRevision());			
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if ( repo != null ) {
				repo.closeSession();
			}
		}
		

	}

}
